package ControllerLayer.ControlManager;

import DataLayer.DataManager.IDataManager;
import java.awt.geom.Line2D;
import java.util.ArrayList;

/**
 * Interface for the Control Manager
 * @author Kovács Áron
 */
public interface IControlManager {

    /**
     * Recognizes the text on the loaded image after preprocessing and segmentating it.
     */
    public void recognizeText();

    /**
     * Segmentates the preprocessed loaded image, and finds the words on it.
     * @return The coordinates of the words on the image.
     */
    public ArrayList<Line2D> generateWords();

    /**
     *
     * @return The Data Manager.
     */
    public IDataManager getDataManager();

    /**
     * Inserts the coordinates of the characters from the actual word int the Image Components Info.
     * @param word - The actual word.
     * @param wordID - The number of the actual word.
     * @param charCoords - The coordinates of the characters in the actual word.
     */
    public void insertWordInformationInImageComponents(String word, int wordID, ArrayList<Integer> charCoords);

    /**
     * Delegates the character normalization.
     */
    public void sendConfirmationForNormalization();

    /**
     * Exports the information in the knowledgebase.
     * @return
     */
    public boolean exportDatabase(String exportPath);

    /**
     * Imports another knowledgebase and merges it with the existing one.
     * @param kbPath - The path to the knowledgebase.
     */
    public void importAndMergeDatabase(String kbPath);

    /**
     * Generates a PDF document from the recognized text.
     * @param text - The text to be written in the PDF.
     * @param nameOfPDF - The path and name of the desired PDF document.
     */
    public void generatePDF(String text, String nameOfPDF);


}
